import { defineStore } from 'pinia'
import { computed, ref } from 'vue'

export const useXxx = defineStore(
  'xxx',
  () => {
    const count = ref(0)
    const getCount = computed<number>(() => {
      return count.value * 2
    })
    const setCount = (n: number) => {
      count.value += n
    }
    return { count, getCount, setCount }
  },
  {}
)
